/*    */ package my.rummyInterface;
/*    */ 
/*    */ import java.awt.Color;
/*    */ import java.awt.Font;
/*    */ import java.awt.GridLayout;
/*    */ import java.awt.event.ActionEvent;
/*    */ import java.awt.event.ActionListener;
/*    */ import javax.swing.BorderFactory;
/*    */ import javax.swing.JButton;
/*    */ import javax.swing.JPanel;
/*    */ import javax.swing.border.TitledBorder;
/*    */ 
/*    */ public class PanelNuevoJuego extends JPanel
/*    */   implements ActionListener
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/* 29 */   public static String NUEVO = "NUEVO";
/* 30 */   public static String MISMOS = "MISMOS";
/*    */   private RummyInterface principal;
/*    */   private JButton btnNuevo;
/*    */   private JButton btnMismos;
/*    */ 
/*    */   public PanelNuevoJuego(RummyInterface principalP)
/*    */   {
/* 43 */     this.principal = principalP;
/*    */ 
/* 46 */     setLayout(new GridLayout(1, 2));
/*    */ 
/* 49 */     TitledBorder borde = BorderFactory.createTitledBorder("Nuevo Juego");
/* 50 */     borde.setTitleColor(Color.BLUE);
/* 51 */     borde.setTitleFont(new Font("Arial", 1, 12));
/* 52 */     borde.setTitleJustification(2);
/* 53 */     borde.setBorder(BorderFactory.createEmptyBorder());
/* 54 */     setBorder(borde);
/*    */ 
/* 57 */     this.btnNuevo = new JButton("Nuevo");
/* 58 */     this.btnNuevo.addActionListener(this);
/* 59 */     this.btnNuevo.setActionCommand(NUEVO);
/* 60 */     add(this.btnNuevo);
/*    */ 
/* 62 */     this.btnMismos = new JButton("Mismos Juga");
/* 63 */     this.btnMismos.addActionListener(this);
/* 64 */     this.btnMismos.setActionCommand(MISMOS);
/* 65 */     add(this.btnMismos);
/*    */   }
/*    */ 
/*    */   public void actionPerformed(ActionEvent e)
/*    */   {
/* 71 */     String comando = e.getActionCommand();
/* 72 */     if (comando.equals(NUEVO))
/*    */     {
/* 74 */       this.principal.nuevoJuego();
/*    */     }
/* 76 */     if (comando.equals(MISMOS))
/*    */     {
/* 78 */       this.principal.nuevoMismos();
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\Users\Yank\Documents\APO\Rummy\bin\
 * Qualified Name:     my.rummyInterface.PanelNuevoJuego
 * JD-Core Version:    0.6.0
 */